package com.ksyzt.ksite2.server.listener;

import java.util.Date;

import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener;
import javax.servlet.http.HttpSessionEvent;
import javax.servlet.http.HttpSessionListener;

import com.ksyzt.gwt.server.common.Logger;
import com.ksyzt.gwt.server.listener.KsyztServer;
import com.ksyzt.ksite2.shared.PageData;

/**
 * 应用程序监听器 网站的初始化在这个位置发生
 *
 * @author 张建设
 *
 */
public class KSite2Server implements ServletContextListener,
		HttpSessionListener {

	private String tag="ksite2 server";
	public void info(String info)
	{
		Logger.LOG.info(tag, info);
	}
	public static PageData PAGEDATA;
	public void contextDestroyed(ServletContextEvent arg0) {
		
		info(PAGEDATA.getName()+"stopped at "+new Date());
	}

	

	public void contextInitialized(ServletContextEvent arg0) {
		PAGEDATA =new PageData();
		PAGEDATA.siteInfo=KsyztServer.SITEINFO;
		info(PAGEDATA.getName()+"started at "+new Date());
	}

	public void sessionCreated(HttpSessionEvent arg0) {


	}

	public void sessionDestroyed(HttpSessionEvent arg0) {

	}
}
